package com.example.gxtt.admin.webapi.controller;

import cn.tedu.gxtt.admin.service.IAdminService;
import cn.tedu.gxtt.commons.pojo.admin.AdminUpdateEnable;
import cn.tedu.gxtt.commons.restful.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/gxtt/admin")
// knife4j介绍当前控制器的作用
@Api(tags = "管理员模块")
public class AdminController {
    @Autowired
    private IAdminService adminService;

    @PostMapping("/update")
    @ApiOperation("修改用户的启用")
    public JsonResult buy(AdminUpdateEnable adminUpdateEnable) {
        adminService.updateUserEnable(adminUpdateEnable);
        return JsonResult.ok("启用修改成功");
    }

}
